package de.dailab.graphworld.ontology;

import de.dailab.jiactng.agentcore.knowledge.IFact;

/**
 * A model of task created by scout and proxied by broker.
 *
 * @author Kseniya
 */
public class Task implements IFact {

    public Node goldNode;

    public Task(Node goldNode) {
        this.goldNode = goldNode;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof Task)) {
            return false;
        }
        Task another = (Task) obj;
        return goldNode.equals(another.goldNode);
    }

    @Override
    public int hashCode() {
        return 31 * (31 + goldNode.hashCode());
    }

    @Override
    public String toString() {
        return "[node " + goldNode.getID() + ", gold " + goldNode.getGold() + ']';
    }
}
